perm filename FOO[E,ALS]1 blob sn#117904 filedate 1974-09-05 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00015 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	To learn to use the editor "E" type  R ETEACH←TEACH[UP,DOC] with a carriage return
C00006 00003	Page moving commands are single character commands that require the use of both
C00011 00004	E has several LINE mode commands.
C00016 00005	LINE EDITING COMMANDS.
C00022 00006	Some less important line editing commands that you can skip the first time through.
C00024 00007	More LINE mode commands. ATTACH and COPY.
C00029 00008	The ADD-TEXT and LINE-INSERT modes.
C00033 00009	A review of some confusing commands. Fixes are needed where *'s are shown.
C00036 00010	(E teacher -- continued from page 5).
C00037 00011	The E command terminates the edit by updating
C00038 00012	Welcome back.
C00042 00013	<rept>A (ATTACH) causes <rept> lines (where <rept> may be specified
C00045 00014	X enters EXTEND mode for one extend-mode command line.
C00050 00015	Start an edit by typing:
C00053 ENDMK
C⊗;
To learn to use the editor "E" type  R E;TEACH←TEACH[UP,DOC] with a carriage return
  and follow instructions.

This will copy TEACH into your file area under the name TEACH and allow you to read
  and modify it for practice.

You are now looking at page 1 of this file (see the line at the top with asterisks).
  Page 0 is the "directory" page used by E itself and of use to you later.

NOTATION used in TEACH by way of abbreviation.
   When a number is shown in a command, this is by way of example, and any desired
   number may,of course, be used.

   α     means hold the "CONTROL" key down while typing the character that follows.
   β     means hold the "META" key down while typing the character that follows.
   ⊗     means hold both "CONTROL" and "META" keys down while typing the character.

   <cr>    carriage return key.
   <lf>    line feed key.
   <tab>   tab key.
   <alt>   altmode key.
   <bs>    backspace key.
   <form>  form-feed key.
   <vt>    the VT key.

   >>    indicates a line which is present for you to play with.
   !     indicates an instruction to follow for practice.

   CURRENT   means the current line (the one with the arrow on the left).

If you make a mistake or get into a state you don't understand, type <alt>.

! Type ⊗P to go on to page 2. (This means hold CONTROL and META down and type P).
Page moving commands are single character commands that require the use of both
<CONTROL> and <META> keys.

There are several page moving commands.

   ⊗P	  Go to the next page. (You have just done this).
   ⊗-⊗P   Back up to the previous page. ! Try this now and then return with ⊗P.

   ⊗+⊗7⊗P  Go foreward 7 pages if possible otherwise to the last page.
   ⊗-⊗3⊗P  Go backward 3 pages if possible otherwise to the first page.

   ⊗7⊗P   Go to page 7. (Don't do this now if you don't want to get lost).

! If you are sure that you know these commands, skip around a bit and get back here.
You will find that the directory on page 0 lists the first line of each page.

There are two things to note since we are now looking at a longer page than before.
   1 The top line still contains asterisks, the page number and the file name.
   2 The bottom line has a row of dashes whereas on page 1 there were asterisks.

The asterisks mean that the window starts at the begining of the page while the
dashes mean that there is more material on this page than that shown. If we were
to move the window down, as we will do in a minute, the asterisks at the top would
be replace by dashes. If we should then see to the end of the page the dashes
would be replaced by asterisks.

It may be well to note also that there are two lines at the very bottom that echo
your command or acknowledge its execution.

There are several line commands that allow you to move the window up or down on the
screen and to move the current-line marker (the "→") around.

! Now type ⊗W to advance the window to see the rest of this page.

Good for you. ! Now before you forget twpe ⊗L to go back and try it again.

Since this page is less than two windows long, several interesting things happened.

  The window moved down on the page only far enough to get to the end of the page.
  The arrow which had previously been attached to the first line of text was moved
    to the last line and stayed with it as the window moved. This "→" points to the
    line called CURRENT and this line would be affected if you were to give an
    intra-line command. More on this later.
  The dashes at the bottom of the window have been replaced by asterisks. If the
    page had been longer, the dashes would have  remained and we would have
    had to give one or more additional ⊗W commands to get to the end of the page.

It is good practice to limit the page size to perhaps 150 lines, both to ease the
  load on the editor and as a safety precaution (if the machine goes down you may
  lose the current page changes), and finally so that the directory will be of use
  not only to the editor but also to you later (if your first lines are comments).

You will next want to know how to move the CURRENT line pointer up and down on the
  page but in keeping with the good practice recommendation this information will
  be on the next page.

! So ⊗P.

E has several LINE mode commands.

   ⊗W     Advance the window so that the last line on the screen becomes the first.
           If there is not enough additional material to fill the screen the window
           will move only until all of the rest of the page shows. (You know this).
   ⊗L     Move the window backward so that the first line becomes the last. This is
           the reverse of ⊗W.

   <cr>   Move the "Current line" pointer down a line. ! Try this now several times..

   ⊗>     Move the pointer down 4 lines. This takes 4 keys at once, ! Try it.
   ⊗≥     Move the pointer down 16 lines. This also takes 4 keys.

! Use the above instructions to get CURRENT to this line. If you should go too far
   then read the instructions that follow to get back.

   <vt>   Move the "Current line"pointer up a line.   !(Try this now).
          ⊗<     Move the pointer up 4 lines.
          ⊗≤     move the pointer up 16 lines.

   ⊗T     Move the pointer up to the top line, and adjust screen to show a few lines
           above this if there are any. !(Try this now).
   ⊗B     Move the pointer to the bottom line of the window, and adjust screen to
           show a few more lines if there are some on th same page. !(Try it).

   ⊗J     Move the window so that the Current line is at the top of the screen.

   ⊗D     Delete the entire line marked by the arrow (don't try unless CURRENT
          is at a practice line. <alt> does not undo this command.

! Try these commands several times ending with one or more ⊗B commands until
    asterisks appear at the bottom and then read to the end of the page.

It should be noted that most of the LINE mode commands require the CONTROL and
  META keys. The exceptions are <cr> and <vt>. However it should be noted that
  these are rather special commands and they do more than just move CURRENT
  around. When you are editing a line the carriage return signals the end of the
  editing. One must also be able to introduce a carriage return into the text and
  this will be explained in due course.

The reason for moving the pointer around is, of course so that you can edit a
  line of text or add more text and even to delete some on occasion.

E uses the line editing commands that are a part of the operation system, which
  you may already know. However for completeness these will be summarized on the
  next page. Normally almost anything that one can type that does not require the
  META keys will enter the intra-line mode.
! When you are ready ⊗P.
LINE EDITING COMMANDS.

Characters without a CONTROL or META key, when typed cause the line editor to be
entered and the character to be typed into the CURRENT line. At the same time a
cursors appear under the first character in the line and under that position in
the line where the next character will be typed.  Characters so typed overwrite
the character that was at the cursor's position.

A word of caution- it is usually safe to continue typing after entering the INTRA-
LINE mode without waiting for the system to catch up, but it sometimes fails so
look at your line before giving a carriage return and if anything is amiss type
<alt> and start over again. Strange things can happen so do not try to save a
partially correct line for later re-editing.

An exception to the overwriting rule occurs when the CURRENT line is at the lower
row of asterisks. When one types into this line the asterisks simply dissapear to
reappear when one ends editing with extra space on the page automatically added to
allow for the material typed. Remember to try this when you come to the bottom of
this page. By the way, this page is more than one window in length so remember ⊗W.)

Any of the α line editing commands listed below will also enter the INTRA-LINE
mode.

When in the INTRA-LINE mode a <cr> will terminate the mode and move CURRENT to
the next line.

! Try typing something into the next line.
<< This is a practice line. This is a practice line. This is aprractice line.

If you make a mistake and perhaps lose some valuable information hit <alt> instead
of a carriage return and your data will reappear as if by magic. ! Try it.

!  If this line is near the bottom of the screen and you have read to here do a ⊗W.

Some usefull line editing commands are:

  α<space>   move the cursor to the right 1 space.
  α<bs>      move the cursor to the left 1 space.
  α<form>    move the cursor to the start of the line.
  α<tab>     move the cursor to the end of the line.

  αS then <char>    move the cursor to the first occurance of <char>.
  α3αS then <char>  move the cursor to the 3rd occurance of <char>

  αD         delete a character and move the rest of the line to the left.
             If at the end of the line, delete the carriage return and join lines
  β<bs>      delete the character to the left of the cursor position.
  <bs>       back up at the end of a line.

  β<char>    move line from cursor position to right and insert character <char>.
  β<cr>      insert a carriage return and stay in intra-line mode.

  αI         enter INSERT mode (equivalent to holding META down continuously).
                When in INSERT mode everything that you type eincluding carriage
                returns but excepting other intra-line commands will appear as
                text.
             Any INTRA-LINE command and many INTER-LINE commands will cause an
                exit from the INSERT mode (excepting <cr> as just noted). The
                safest command under these conditions is α<cr>.

  <cr>       leave intra-line mode, accept the current line and move to next line.
  α<cr>      leave intra-line mode, accept the line but do not advance CURRENT.

  <alt>      restore the line to it original condition and leave intra-mode.
! Woops a ⊗W is needed.

!  Try introducing several lines of text beyond this point perhaps starting each
line with a couple of << so as not to confuse yourself.

! Go to the next page.
Some less important line editing commands that you can skip the first time through.

  ⊗<vt>   terminates the edit, and backs up a line.
  ⊗↑      terminates the edit, then backs to the end of the previous line.
  ⊗↓      terminates the edit, then goes to the end of the next line.

These commands work even when in INTER-LINE mode.

If you are editing a line and type something that the line editor does not
  understand it will usually ignore the error (after thinking about it for a
  moment) but don't bank on this too heavily because it can fail.

If you type a legal ⊗ command (other than ⊗P or ⊗D) when in intra-line mode the
  line will be accepted as edited.  Then the command will be carried out.

! Get into a line, and type ⊗J, or ⊗W, or ⊗≥.  Also try ⊗P, ⊗D.

The α<cr> command that works to recall a line from the system buffer when in
  the system's monitor mode does not work in E but is replaced by the copy
  command which will be explained on the next page. Yoy will recall that
  α<cr> has a diferent meaning in E. What is it?

More LINE mode commands. ATTACH and COPY.

The ATTACH command allows one to put one or more contiguous lines from a single
  page away in a special attach buffer and then to move these lines around on
  the page or from page to  page by using the same commands that we have just
  learned to use to move the CURRENT line arrow around.  To avoid confusion, we
  must think of the ATTACH command as a mode changing command and realize that
  almost all commands now have different meanings.

To make it clear that we are in to ATTACH mode the arrow at the left is
  changed to a vertical bar (thus |) marking the lines that are attached.

ATTACH commands.

  ⊗A     Attach the CURRENT line and change the "→" to a "|".
  ⊗3⊗A   Attach 3 lines starting with CURRENT aand mark these with  "|'s".
  ⊗#⊗A   ATTACH # lines (where # is a number greater than 8) starting with
           CURRENT but show only the first 4, put in . . . to indicate some
           unshown lines and show the last 3 lines that are attached.

  ⊗E     Deposit the attached lines in the position shown and exit from the mode.
           Note that this command has a different meaning when one is NOT
           in the ATTACH mode (it then means EXIT editing), so don't stutter
           when typing it but give the system time to reeact.
  ⊗R     Replace the attached lines in their original location and leave the
           ATTACH mode.
  ⊗K     Kill the attached lines (they simply go away beyond recall) and exit
           from the ATTACH mode.

  ⊗C     Make a copy of the CURRENT line and ATTACH this copy.
  ⊗#⊗ε   Make a copy of # lines starting with CURRENT and ATTACH these.

! ⊗W for more.

Note that all of the attached lines must be from the same page and that they can
  only be left togather on the same page. This can be thought of as an advantage
  making it easy to attach all of the lines to the end of the page by simply giving
  a large number or it can be thought of as a limitation.

A word of warning, if you move attached lines from page to page it may take a
  little time so do not get impatient.

! Before going on, try attaching the practice lines below and move them around.
    If you get too far from home give a ⊗R command and you will be back.

<< This is practice line number 1.
<< This is practice line number 2.
<< This is practice line number 3.
<< This is practice line number 4.
<< This is practice line number 5.
<< This is practice line number 6.
<< This is practice line number 7.
<< This is practice line number 8.
<< This is practice line number 9.
<< This is practice line number 10.
The ADD-TEXT and LINE-INSERT modes.

One enters the ADD-TEXT mode by moving CURRENT to the bottom row of asterisks.
  One can then add to the text simply by starting to type. The end-of-page marker
  moves down to make room.  When something has been typed, all of the usual INTRA-
  LINE commands may be used. When the CURRENT arrow points to the row of asterisks
  the editor responds to all of the usual INTER-LINE commands.

To insert text at some other place, one can enter the LINE-INSERT mode. This
  differs from the ADD-TEXT mode in that certain commands are no longer allowed
  and one must be careful to leave the mode properly or dire things can happen.
  The fact that the editor is in the LINE-INSERT mode is signalled by the use of
  a double arrow CURRENT line marker ↔ in place of the right arrow →.

When typing in LINE-INSERT mode everything that you type (including <cr> but not
  the LINE-INSERT commands) gets put into the text.

LINE-INSERT commands

  ⊗<cr>   enter LINE-INSERT mode, move the current line down to make room for the
	    insert and mark the new line with the double arrow ↔.
          If you are in the middle of a line in the INTRA-LINE mode, this command
            will break the line at the cursor position into two lines,
	    enter the LINE-INSERT mode and be ready to accept text between the
	    two halves of the original line.
	  If you are already in the LINE-INSERT mode while in the middle of a line,
            this command will break the line at the cursor position and be ready to
	    accept text at the end of the second section.

  α<cr>   leave the LINE-INSERT mode and accept the line in question.
           
  <alt>   accept the line up to the cursor but delete the rest and leave the
            the arrow pointing to the remaining text if any or to the next line.



! Try these somewhere.

>> perhaps between here
>>    and here

! ⊗P to continue.
A review of some confusing commands. Fixes are needed where *'s are shown.
  Certain commands mean different things depending upon the circumstances.

Command		   Mode     	Meaning
 
 <cr>		INTER-LINE	Move Current down to the next line.
		INTRA-LINE	Terminate the line edit and move Current down.
		INSERT		Accept line and move CURRENT down.
		ADD-TEXT	Accept line and move CURRENT down.
		LINE-INSERT	Accept line and provide space for next line.
		ATTACH		Move the location of Attached lines down one line.

 α<cr>		INTER-LINE	Do nothing.
		INTRA-LINE	Accept line and do not move CURRENT.
		INSERT		Accept line and do not move CURRENT.
		ADD-TEXT	Accept line and do not move CURRENT.
		LINE-INSERT	Accept line, exit INSERT mode.
		ATTACH		Don't * (gets confused and does nothing).

 ⊗<cr>		INTER-LINE	Enter LINE-INSERT mode
		INTRA-LINE	Split line, enter LINE-INSERT mode between pieces.
		INSERT		Split line, enter LINE-INSERT mode between pieces.
		ADD-TEXT	Split line, enter INSERT mode with cursor at end of
				  of second part, which is temporily not shown.*
		LINE-INSERT	Split line, move cursor to end of second part.*
		ATTACH		Illegal. Do nothing.

 <vt>		INTER-LINE	Move CURRENT up one line.
 		INTRA-LINE	Don't *. A "" is overwritten into the text.
		INSERT		Don't *. A "" is overwritten into the text.
		ADD-TEXT	Don't * if some text has been typed, otherwise OK.
		LINE-INSERT	Don't *. A "" is overwritten into the text.
		ATTACH		Move the Attached lines up one line.

(E teacher -- continued from page 5).

<rept>⊗<cr> is different from ⊗<cr>. <rept>⊗<cr> inserts <rept> blank
  lines below the arrow, never actually entering insert mode.

!  Try it.

>> Perhaps between here 
>>  and here.

When you <cr> past the end of a page, new lines are created just ahead of
  you, so you won't fall off.  This is almost, but not quite like insert mode.
!  Try it here, then advance to the next page.
The ⊗E command terminates the edit by updating
  the current page if necessary, then blanking the screen
  and exiting.  Don't try it now, unless you want to waste
  some time getting back here. 
(page)
Welcome back.

<rept>⊗D is fun -- try it on the practice line below.

>> This line doesn't exist.

⊗. writes the current page into the disk file, if it has changed.  This
   is the equivalent of, but is faster than, the W command in SOS.

⊗Q causes the line just above CURRENT to be duplicated.  The duplicate
   line is then opened for editing.  The effect is similar to that obtained
   by α<cr> when you are not using E.


SEARCHING
The Repeat argument <rept> may, in most cases, be obtained associatively:
   that is, by specifying some text string to be searched for in order
   to specify a range of lines to be affected.
⊗F, followed by a string of non-activation characters, specifies a search
   string.  This string is used by different commands in different ways:

  ⊗Fsmith<cr> computes the number of lines from the arrow to a line containing
     "smith", using that count as the <rept> factor-- in other words, the arrow
     moves to the line containing "smith". (⊗↓ can replace <cr>).
  ⊗Fsmith⊗D  computes the number of lines as above, then uses the count to
     delete all lines down to, but not including the line with the match.
  ⊗Fsmith⊗J is the same as ⊗Fsmith<cr>⊗J.
  ⊗Fsmithα<cr> searches forward, as with ⊗Fsmith<cr>, but starting on the current
     line.  If it finds the string, it moves CURRENT to that line and enters
     intra-line edit mode, with the line editor cursor under the first
     character of the search string (the "s" in "smith" for this example).

  <alt> cancels the current search string, and cancels any repeat factor already
      calculated.  Otherwise, ⊗F with a null string causes the previous value 
      to be used.
  ⊗F never crosses page boundaries.

Actually, there are two kinds of search commands, ⊗F and αF.  The former only
  matches a string if it is surrounded by non-alphameric characters; that is,
  "Smithsonian" would be found by αF but not by ⊗F.

! Back up the page and try searching with ⊗F and with αF.

Go on to page 10.
<rept>⊗A (ATTACH) causes <rept> lines (where <rept> may be specified
   with ⊗F) to be deleted from the page, from CURRENT to CURRENT+
   <rept>-1 and placed in a special array, safe from
   harm.  Up to 8 of these lines are also displayed (with "|" along the
   left margin) at CURRENT. These lines remain "ATTACHed", no matter where
   the arrow (which has become a "|" for clarity) is moved.

When lines are attached, a large subset of commands are illegal; Remaining
   legal commands are ⊗A, ⊗C, and arrow-moving commands, for the most part. 
   Legal commands may be experimantally discovered.  In addition, there
   are a few commands which are redefined or unique to ATTACH mode:

 ⊗E -- EXIT Attach mode, and restore the lines to the current page
   (which may be different from the original) in the position they 
   occupy on the screen.
 ⊗K -- exit ATTACH mode, and KILL the attached lines -- they go away.
 ⊗R -- exit ATTACH mode, and REPLACE the attached lines in their original
   page and line.

!Attach some lines and move them around.  Try detaching from them in any of
!  the ways indicated.

>> a practice line.
>> a practice line.
>> a practice line.
>> a practice line.
>> a practice line.
>> a practice line.

<rept>⊗C is identical to ⊗A, except the original lines are not removed from
  the file.  The lines have been COPYd.

The next page describes EXTEND mode.
⊗X enters EXTEND mode for one extend-mode command line.
  Extend mode commands are complete words, which may be
  abbreviated as can commands to the TS monitor (that is,
  you have to type enough characters).  If any parameters
  are required for a command, they should be separated from
  the command by a space. <cr> terminates a command line.
  After the command has been executed, E reverts to LINE mode.

Extend-mode commands:

DRAW -- Use this when your screen is covered with glitches, garbage,
  etc., after doing an <esc>C to clear it.  All segments of the
  screen will be re-displayed.  Otherwise, only those things which
  change are redrawn. This command will happen automatically as soon
  as possible after an <esc> C is typed.
Typing ⊗V also has this effect, even while editing a line.
! Type ⊗V

DDT -- If RAID is present in this version, branches to RAID.  Execute
  BACKαG to return.

DELETE -- deletes the page mark between this page and the next.
! Back up a few pages and try it.

MARK -- inserts a page mark between CURRENT and the line above
  it.  Displays the page on which CURRENT appears.
! Restore the page mark which you deleted.

READONLY -- if in read/write mode, writes the current page if any changes
  were made, then inhibits further writing.  You can modify a page in core,
  but not on the disk.

READWRITE -- if in readonly mode, disables the write-inhibit.

CANCEL -- Reads the current page from the disk, without writing anything
  out.  Cancels any changes to the page since the last time it was written.
 
FIND -- Follow by space, then a string, then a <cr>.
  This is like ⊗Fstring<cr>, except it will cross page boundaries to find
  the line.  The search string for FIND is remembered independently of
  that for ⊗F.  ⊗XFIND and αXFIND act analogously to ⊗F and αF.

GO -- Does what ⊗E does, except that, instead of exiting,
  it repeats the last RPG command.  It is like the G command of
  SOS.


This document has not been entirely honest in describing the commands. 
   It has made available most of the features of the editor, but has not
   necessarily described all the ways in which these features may be
   invoked.  Many commands have optional codings -- most may be called
   using fewer control bits than we have required here.  A complete
   description of E features is available in the TV manual,
   TVED.DCS[S,DOC], and the file TV2E.FW[UP,DOC] which describes how
   E differs from TV.

One page remains (the next one). On it is described the various commands
  one can give to begin editing a file.
Start an edit by typing:

ET filespec<cr>

A <file spec> is:
    <file name, including extensions, PPNs and stuff>{switches}
    where switches can be /R, meaning read-only, /nP for page n,
    or /nL for line n.  If you want more than one switch, you can
    enclose them all in parentheses and omit the slashes, e.g.

ET FILE.EXT(3P24L)

    to edit file FILE.EXT, starting on line 24 of page 3.

NOTE: Unlike the other editing commands (for TV, SOS, and TECO), an ET
    command with a PPN does not copy the file to your own directory and
    edit the copy; it actually edits the file in the area you specify!!

CE filespec<cr>
  will create a file of the given name (omit PPN and switches).  It will have
  a directory page, and one more, blank, page.
 ________
 N.B. A directory is a special first page, which is tacked on to the file
   before the first actual data page, the first time the file is edited.
 --------

! Type ⊗1⊗P to see what the directory page looks like.

More complicated commands, including the one you used to start this edit, are
   described in the TV manual.

Credits: Dan Swinehart wrote TV, the original version of the display editor,
   and also created the original version of this file to teach the use of TV.
   The new version, E, was written and is maintained by Fred Wright, who
   is the man to complain to about bugs.  This file was modified to reflect
   the differences between E and TV by Brian Harvey.

				-30-